package com.ndp.fb.walle.model.vo.versionInfo.result;

import com.ndp.fb.rdb.model.version.VersionInfo;
import com.ndp.fb.util.DateUtil;

import java.io.Serializable;
import java.util.Date;
import java.util.TimeZone;

/**
 * Created by elvisxiong on 16/3/1.
 */
public class VersionInfoVo implements Serializable{

    //编号
    private Long id;
    //版本
    private String version;
    //内容
    private String body;
    //语言编码
    private Long dictionaryId;
    //更新时间
    private String updateTime;
    //创建时间
    private String createTime;

    public VersionInfoVo(VersionInfo versionInfo){
        this.setId(versionInfo.getId());
        this.setVersion(versionInfo.getVersion());
        this.setBody(versionInfo.getBody());
        this.setDictionaryId(versionInfo.getDictionaryId());
        this.setUpdateTime(DateUtil.formatDate(new Date(versionInfo.getUpdateTime().longValue()),"yyyy-MM-dd H:m:s", TimeZone.getDefault()));
        this.setCreateTime(DateUtil.formatDate(new Date(versionInfo.getCreateTime().longValue()),"yyyy-MM-dd H:m:s", TimeZone.getDefault()));
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public Long getDictionaryId() {
        return dictionaryId;
    }

    public void setDictionaryId(Long dictionaryId) {
        this.dictionaryId = dictionaryId;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }
}
